import Vue from 'vue'
import App from './App.vue'
import router from './router'
import '../src/assets/font/iconfont.css'
import '../src/assets/css/global.css'
import axios from 'axios'
import './plugins/element.js'
import '../src/util/rem'
import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css'
// use
import Notifications from "vue-notification";
Vue.use(Notifications);
Vue.use(mavonEditor)
Vue.prototype.$axios = axios
Vue.prototype.$http = axios

axios.defaults.baseURL='/api'

axios.interceptors.request.use(config => {
  // console.log(config)
  config.headers.Authorization = 'Bearer' + ' ' + localStorage.getItem('token')
  // 必须在最后返回config
  return config
}, error => {
  return Promise.reject(error)
})

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
